package com.github.vortexdev.yachtclub.repository;

import com.github.vortexdev.yachtclub.models.Yacht;
import com.github.vortexdev.yachtclub.util.db.Page;
import com.github.vortexdev.yachtclub.util.db.Sort;

import java.util.List;
import java.util.Map;

/**
 * @author Sergey Parakhin (sergey.parahin@gmail.com)
 */
public interface YachtRepository {
    Yacht find(int id);

    Yacht findWithOwnerName(int id);

    void save(Yacht yacht);

    List<Yacht> findYachtsWithOwnerNames(Page page);

    List<Yacht> findYachtsWithOwnerNames(Page page, Sort sort);

    List<Yacht> findYachtsWithOwnerNames(Page page, Map<String, Object> criteria);

    List<Yacht> findYachtsWithOwnerNames(Page page, Map<String, Object> criteria, Sort sort);

    int countYachts();
}
